Interface sjl.RandomIterator
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface sjl.RandomIterator

public interface RandomIterator
extends Object
extends BidirectionalIterator
Defines the methods allowed on random iterators. Random iterators allows long-jumping in both directions, and comparing two iterators for relativ ordering.

Copyright © 1996 Finn Bock


Method Index

 o get(int)
Return the object placed distance elements away.
 o less(Iterator)
Return true if the position of this is lower than the position of target
 o next(int)
Advance the iterator distance elements forwards (or backwards if distance is negative).
 o prev(int)
Advance the iterator distance elements backards (or forwards if distance is negative).
 o put(int, Object)
Place the object in the position distance elements away.

Methods

 o less
  public abstract boolean less(Iterator target)
Return true if the position of this is lower than the position of target
Parameters:
target - the iterator to compare with.
Returns:
true if this is lower than target.
 o get
  public abstract Object get(int distance)
Return the object placed distance elements away.
Parameters:
distance - a relative offset.
Returns:
Return the object placed distance elements away.
 o put
  public abstract Object put(int distance,
                             Object object)
Place the object in the position distance elements away.
Parameters:
object - the object to put into the container.
distance - a relative offset.
Returns:
The object just inserted.
 o prev
  public abstract RandomIterator prev(int distance)
Advance the iterator distance elements backards (or forwards if distance is negative).
Parameters:
distance - a relative offset.
Returns:
this.
 o next
  public abstract RandomIterator next(int distance)
Advance the iterator distance elements forwards (or backwards if distance is negative).
Parameters:
distance - a relative offset.
Returns:
this.

All Packages  Class Hierarchy  This Package  Previous  Next  Index